package com.letoken.platform.app.controller;


import com.letoken.platform.app.service.AppExReportService;
import com.letoken.platform.pub.annotation.auth.NotAuthorization;
import com.letoken.platform.pub.res.ApiResponse;
import com.letoken.platform.repo.app.req.ex.ExReportReq;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 作者
 * @since 2023-06-06
 */
@RestController
@RequestMapping("/ex")
@Api(tags = "异常", description = "异常")
public class AppExReportController {

    @Autowired
    private AppExReportService appExReportService;

    @NotAuthorization
    @PostMapping("/report")
    @ApiOperation(value = "上传app异常信息", notes = "上传app异常信息")
    public ApiResponse report(@Validated @RequestBody ExReportReq req){
        appExReportService.report(req);
        return ApiResponse.create("");
    }
}

